
SRCTREE=$(shell cd .. && pwd)

CFLAGS=-g -Wall -I. -I$(SRCTREE)/mgrfw/include -I$(SRCTREE)/osdep/include -I$(SRCTREE)/pfdep/include
LDFLAGS=

# wlan cli  autoip.
autoip_TARGET=autoip
autoip_SRC=autoip.c arp.c
autoip_OBJ=$(patsubst %.c,%.o,$(autoip_SRC))

TARGETS=$(autoip_TARGET)

.PHONY: all clean
all: $(TARGETS)

$(autoip_TARGET): $(autoip_OBJ)
	$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $(autoip_TARGET)

$(obj)%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm -fr *.o *.a *.bak *~ $(TARGETS) $(autoip_OBJ)
